<script>
$(document).ready(function(){
	send('get_log','',function(response){
		console.log(response.req);
		$('#log_today').html();
		if(response.req.length>18){ $('.more').show();}
		$.each(response.req,function(i,v){
			var date = new Date(v['date']);
			var day = (date.getDate()-0); if(day<10){ day = '0'+day;}
			var mouns = date.getMonth()-0; if((mouns+1)<10){ mouns = '0'+(mouns+1);}
			var year = date.getFullYear();
			var hour = date.getHours()-0; if(hour<10){ hour = '0'+hour;}
			var minutes = date.getMinutes()-0;  if(minutes<10){ minutes = '0'+minutes;}
			var date_t = new Date();
			var day_t = (date_t.getDate()-0); if(day_t<10){ day_t = '0'+day_t;}
			var mouns_t = date_t.getMonth()-0; if((mouns_t+1)<10){ mouns_t = '0'+(mouns_t+1);}
			var year_t = date_t.getFullYear();
			if(day_t==day&&mouns_t==mouns&&year_t==year){
			$('#log_today').prepend('#'+i+' разослано '+v['count']+' писем '+day+'.'+mouns+'.'+year+' в '+hour+':'+minutes+'<br>');
			}
			$('#log_all').prepend('#'+i+' разослано '+v['count']+' писем '+day+'.'+mouns+'.'+year+' в '+hour+':'+minutes+'<br>');
		});
	});
});
</script>
<div class="home">
    <div class="title">Статистика рассылки</div><div class="clear10"></div>
    <div class="log fl">
        <div class="head">Разослано сегодня</div>
        <div id="log_today"></div>
    </div>
    <div class="log fl">
        <div class="head">Разослано всего</div>
        <div id="log_all" class="hide">
        
        </div>
        <a href="#" class="more" style="display:none;">еще</a>
    </div>
</div>
<script>
$(document).ready(function(){
	$('.more').click(function(){
		$(this).hide();
		$('#log_all').css({maxHeight:'none'});
		return false;
	});
});
</script>